package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.dao.CountriesMapper;
import com.whq.entity.Countries;
import com.whq.service.CountriesService;

@Service(value = "tcCountriesService")
public class CountriesServiceImpl implements CountriesService {

    @Autowired
    private CountriesMapper<Countries>tcCountriesMapper;
    
    @Override
    public Integer insertSelective(Countries tcCountries) throws Exception {
           return this.tcCountriesMapper.insertSelective(tcCountries);
        }

    @Override
    public Integer insertBatch(List<Countries> tcCountries) throws Exception {
           return this.tcCountriesMapper.insertBatch(tcCountries) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tcCountriesMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tcCountriesMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(Countries tcCountries) {
           return this.tcCountriesMapper.updateByPrimaryKeySelective(tcCountries);
    }

    @Override
    public Countries findById(Object id) {
           return (Countries) this.tcCountriesMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Countries> selectByCondition(Countries tcCountries) {
           return (List<Countries>) this.tcCountriesMapper.selectByCondition(tcCountries);
    }

    @Override
    public Integer selectCountByCondition(Countries tcCountries) {
           return  this.tcCountriesMapper.selectCountByCondition(tcCountries);
    }

}
